﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HRM.Model;
using GalaSoft.MvvmLight.Ioc;

namespace HRM.ViewModel
{
    public class ExperienceViewModel : ViewModelGeneric<KinhNghiem>
    {
        public ExperienceViewModel(IEntityService<KinhNghiem> service)
            : base(service)
        {
            if (SimpleIoc.Default.IsRegistered<NhanVien>()) Staff = SimpleIoc.Default.GetInstance<NhanVien>();
            else
            {
                throw new Exception("Staff not found");
            }
        }

        public NhanVien Staff { get; private set; }

        public string Title
        {
            get { return string.Format("Kinh nghiệm - {0}", Staff.HoTen); }
        }
    }
}
